#ifndef ___SESSION__CLI__MAIN___
#define ___SESSION__CLI__MAIN___

#include "Service/Session.h"
#include "Service/Service.h"
#include "Message/MsgBuilderIf.h"

class SessionCM : public Session
{
public:
	SessionCM(boost::asio::io_service &svcIO, Service* wpSvcL, Service* wpSvcH, IMsgBuilder* wpBuilder);

	virtual bool write(IMsg* pMsg);

	virtual void onInput(const boost::system::error_code& error, size_t bytes_transferred, MsgBuffer* buffer );
	virtual void onOutput(const boost::system::error_code& error, size_t bytes_transferred, MsgBuffer* buffer );
protected:
	Service*			m_wpLgcSvc;
	Service*			m_wpHostSvc;
	IMsgBuilder*		m_wpMsgBuilder;
	
	bool				m_bDying;

	//
	//	main entity id (global id)
	int					m_nAccountID;
};


#endif

